<?php
/**
 * Created by PhpStorm.
 * User: boye009
 * Date: 2016/3/17
 * Time: 9:13
 */

function getDateInfo($time,$dateline){

    if($time <= 60){
        return "刚刚";
    }else if($time > 60 && $time <= 3600){
        return floor($time/60)."分钟前";
    }else if($time > 3600 && $time <= 3600*24){
        return floor($time/3600)."小时前";
    }else if($time > 3600*24){
        return date('Y-m-d H:i:s',$dateline);
    }

}